{include file="public/head"}

<body>
	
</body>
{include file="public/foot"}

<script type="text/javascript">
	//爬虫
    var urls = 'https://mp.weixin.qq.com/s/GV3YOyEC3VVxMw_1StzDsg';
    // var urls = 'https://mp.weixin.qq.com/s/WpHWIvV_LoOkoPjqSrQv5Q';
    // var urls = 'https://mp.weixin.qq.com/s/4sYbsCpYAUS_oOuBYTG8uA';
    // var urls = 'https://mp.weixin.qq.com/s/KM3TYTRkTAJ2bG_LEQIviw';
	crawler(urls);
	function crawler(urls){
		$.ajax({
			type: "post",
			url: "/admin/Crawler/crawlerQuery",
			async: true,
			data: {
				urls: urls,
			},
			dataType: "json",
			success: function(res) {
				console.log('crawlerQuery',res);
				$("body").html(res[0][0]);
                $("#js_toobar3").html('')
                $("pre").html('')
				getData();
			}
		});
	}
	function getData(){
// 		$.each($('.zzhfb tr'), function(index, value) {
// 			var period, rednum, bluenum;
// 			$.each($(value).find('.tdbg_1'), function(ind, val) {
// 				if(val.className.indexOf('thide') >= 0) {
// 					rednum = $(val).find('.rednum').html();
// 					bluenum = $(val).find('.bluenum').html();
// 				} else {
// 					period = $(val).html();
// 				}
// 			});
// // 			inData(period, rednum, bluenum);
// 		});
	}
	
	function inData(period, rednum, bluenum) {
		$.ajax({
			type: "post",
			url: "/admin/Double/inData",
			async: true,
			data: {
				period: period,
				rednum: rednum,
				bluenum: bluenum,
			},
			dataType: "json",
			success: function(res) {
				console.log(res)
			}
		});
	}
</script>